# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-copr
pkgver=1.123
pkgrel=3
pkgdesc="Python client for copr service"
url="https://pagure.io/copr/copr"
license=('GPL')
arch=('any')
depends=('python-marshmallow' 'python-requests' 'python-requests-toolbelt' 'python-six' 'python-munch'
         'python-future' 'python-filelock' 'python-requests-gssapi')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("https://pagure.io/copr/copr/archive/python-copr-$pkgver-1/copr-python-copr-$pkgver-1.tar.gz")
sha512sums=('ecad765e83b5310616561bd5fc1ec956fb22667a71f6ade040970290843b0703e3559f15c76c9f0d4ea20db75e90b49ee7fce24a93c04fbe1ffa7dfa63edd346')

build() {
  cd copr-python-copr-$pkgver-1/python
  python setup.py build
}

check() {
  cd copr-python-copr-$pkgver-1/python
  python -m pytest
}

package() {
  cd copr-python-copr-$pkgver-1/python
  python setup.py install --root="$pkgdir" --optimize=1
}
